<template>
  <div class="gray-box top-redius border-bottom-gray">
    <el-tabs>
      <el-tab-pane
        v-for="(param,index) in params"
        :key="index"
        :label="param.title"
      >
        <service-components :params="param" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script setup>
import ServiceComponents from './components/service-components.vue'

const params = [
  // 服务条款参数
  {
    title: $t('sysManagement.serviceTerms'),
    keyCN: 'SERVICE_TERMS_CONFIG_CN',
    keyEN: 'SERVICE_TERMS_CONFIG_EN',
    remarkCN: $t('sysManagement.serviceTermsCnConfig'),
    remarkEN: $t('sysManagement.serviceTermsEnConfig')
  },
  // 隐私策略参数
  {
    title: $t('sysManagement.privacyPolicy'),
    keyCN: 'SERVICE_POLICY_CONFIG_CN',
    keyEN: 'SERVICE_POLICY_CONFIG_EN',
    remarkCN: $t('sysManagement.privacyPolicyCnConfig'),
    remarkEN: $t('sysManagement.privacyPolicyEnConfig')
  },
  // 商家注册协议
  {
    title: $t('sysManagement.merchantRegisterProtocolConfig'),
    keyCN: 'MERCHANT_REGISTER_PROTOCOL_CN',
    keyEN: 'MERCHANT_REGISTER_PROTOCOL_EN',
    remarkCN: $t('sysManagement.merchantRegisterProtocolCNConfig'),
    remarkEN: $t('sysManagement.merchantRegisterProtocolENConfig')
  },
  // 开设商城协议
  {
    title: $t('sysManagement.shopProtocolConfig'),
    keyCN: 'SHOP_PROTOCOL_CN',
    keyEN: 'SHOP_PROTOCOL_EN',
    remarkCN: $t('sysManagement.shopProtocolCNConfig'),
    remarkEN: $t('sysManagement.shopProtocolENConfig')
  }
]
onMounted(() => {
  init()
})

const init = () => {
}
defineExpose({ init })
</script>
